# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=arpalert
pkgver=2.0.12
pkgrel=1
epoch=1
pkgdesc='Monitor ARP changes in ethernet networks.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-networking' 'blackarch-defensive')
url='http://www.arpalert.org/'
license=('GPL')
depends=('libpcap')
source=("http://www.arpalert.org/src/$pkgname-$pkgver.tar.gz")
sha512sums=('0bbc5285db47a0ab130850d000850ef0ae6b825f3ed89ebe7788ca258c127108019e50f63d6b6f6ddfe8f164a2808a7940242eb0d23db343bc2632d775bf8752')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/ --exec-prefix=/usr --includedir=/usr/include \
    --datarootdir=/usr/share --sbindir=/usr/bin

  make
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  make DESTDIR="$pkgdir" install

  rmdir "$pkgdir/var/"{log,run}
}

